﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="EditContact.aspx.cs" Inherits="SD.Web.Iteration1.Contacts.EditContact" %>

<%@ Register TagName="ContactLookupPopup" TagPrefix="wuc" Src="~/Views/Contacts/wucLookup.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../../style/AnhPopup.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentTitle" runat="server">
    <h2>
        Edit Contact</h2>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
            <div class="grid740 simplebox">
                <div class="st-form-line-noleft">
                    <div class="half">
                        <%--<asp:Label ID="LabelFirstName" runat="server" CssClass="st-labeltext" Text="First Name"></asp:Label>--%>
                        <span class="st-labeltext">FirstName<span style="color: Red"> (*)</span> </span>
                        <asp:TextBox ID="txtFirstName" runat="server" Width="180px" CssClass="st-forminput"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtFirstName"
                            runat="server" ErrorMessage="First name is required" ForeColor="red" Display="Dynamic">*</asp:RequiredFieldValidator></div>
                    <div class="half">
                        <asp:Label ID="LabelContactType" runat="server" Text="Manager Name" CssClass="st-labeltext"></asp:Label>
                        <asp:TextBox ID="txtManagerName" runat="server" Width="170px" CssClass="st-forminput"
                            ReadOnly="True" BackColor="#F5F4F3"></asp:TextBox>
                        <asp:LinkButton ID="LinkButtonLookup" runat="server" OnClick="LinkButtonLookupClick"
                            CausesValidation="False">Lookup
                        </asp:LinkButton></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <%--<asp:Label ID="LabelSurname" runat="server" Text="SurName" CssClass="st-labeltext">
                        </asp:Label>--%>
                        <span class="st-labeltext">Surname<span style="color: Red"> (*)</span> </span>
                        <asp:TextBox ID="txtSurname" runat="server" Width="180px" CssClass="st-forminput"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtSurname"
                            ErrorMessage="Surname is required" ForeColor="red" Display="Dynamic">*</asp:RequiredFieldValidator></div>
                    <div class="half">
                        <%--<asp:Label ID="LabelManageName" runat="server" Text="Contact Type" CssClass="st-labeltext">
                            <asp:RequiredFieldValidator ID="RequiredContactType" ControlToValidate="ddlContactType"
                                runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
                        </asp:Label>--%>
                        <span class="st-labeltext">Contact Type<span style="color: Red"> (*)</span> </span>
                        <asp:DropDownList ID="ddlContactType" CssClass="level2" runat="server" DataTextField="ContactTypeName"
                            DataValueField="ContactTypeId">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                            ControlToValidate="ddlContactType" ErrorMessage="Contact type is required" 
                            InitialValue="0">*</asp:RequiredFieldValidator>
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelKnowAs" runat="server" Text="Know As" CssClass="st-labeltext"></asp:Label>
                        <asp:TextBox ID="txtKnowAs" runat="server" Width="180px" CssClass="st-forminput"></asp:TextBox></div>
                    <div class="half">
                        <asp:Label ID="LabelBestContact" runat="server" Text="Best Contact Method" CssClass="st-labeltext"></asp:Label>
                        <asp:DropDownList ID="ddlBestContactMethod" CssClass="level2" runat="server" DataTextField="BestContactMethodName"
                            DataValueField="BestContactMethodId">
                        </asp:DropDownList>
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelOffice" runat="server" Text="Office Phone" CssClass="st-labeltext"></asp:Label>
                        <asp:TextBox ID="txtOfficePhone" runat="server" Width="180px" CssClass="st-forminput"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="regOfficePhone" runat="server" ControlToValidate="txtOfficePhone"
                            Display="Dynamic" ErrorMessage="Office phone invalid" ValidationExpression="^([0-9\s\-])+$">*</asp:RegularExpressionValidator>
                    </div>
                    <div class="half">
                        <asp:Label ID="LabelJobRole" runat="server" Text="Jon Role" CssClass="st-labeltext"></asp:Label>
                        <asp:TextBox ID="txtRole" runat="server" Width="180px" CssClass="st-forminput"></asp:TextBox></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelMobilePhone" runat="server" Text="Mobile Phone" CssClass="st-labeltext"></asp:Label>
                        <asp:TextBox ID="txtMobilePhone" runat="server" Width="180px" CssClass="st-forminput"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtMobilePhone"
                            Display="Dynamic" ErrorMessage="Moblie phone is invalid " 
                            ValidationExpression="^([0-9\s\-])+$">*</asp:RegularExpressionValidator>
                    </div>
                    <div class="half">
                        <span class="st-labeltext">WorkBase<span style="color: Red"> (*)</span> </span>
                        <asp:TextBox ID="txtWorkBase" runat="server" Width="180px" CssClass="st-forminput"></asp:TextBox></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelHomePhone" runat="server" Text="ST Home Phone" CssClass="st-labeltext"></asp:Label>
                        <asp:TextBox ID="txtHomePhone" runat="server" Width="180px" CssClass="st-forminput"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtHomePhone"
                            Display="Dynamic" ErrorMessage="Home phone is invalid " 
                            ValidationExpression="^([0-9\s\-])+$">*</asp:RegularExpressionValidator>
                    </div>
                    <div class="half">
                        <asp:Label ID="LabelJobTitle" runat="server" Text="Job Title" CssClass="st-labeltext"></asp:Label>
                        <asp:TextBox ID="txtJobTitle" runat="server" Width="180px" CssClass="st-forminput"></asp:TextBox></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelEmailAddress" runat="server" Text="Email Address" CssClass="st-labeltext"></asp:Label>
                        <asp:TextBox ID="txtEmailAddress" runat="server" Width="180px" CssClass="st-forminput"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="txtEmailAddress"
                            Display="Dynamic" ErrorMessage="Email is invalid" ValidationExpression="^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$">*</asp:RegularExpressionValidator>
                    </div>
                    <div class="half">
                        <asp:Label ID="LabelIsActive" runat="server" Text="Is Active ?" CssClass="st-labeltext"></asp:Label><asp:CheckBox
                            ID="CheckBoxIsActive" runat="server" /></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="button-box">
                    <asp:Button ID="btnSave" CssClass="st-button" runat="server" Text="Save" OnClick="btnSaveClick" />
                    <asp:Button ID="btnBack" CssClass="st-clear" runat="server" Text="Back" CausesValidation="False"
                        OnClick="btnBack_Click" ValidationGroup="Back" />
                    <br />
                </div>
            </div>
            <span style="color: Red">
                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
            </span>
            <wuc:ContactLookupPopup ID="ContactLookup" runat="server" MaximumRows="5" HiddenFieldResultID="HiddenFieldManagerId"
                TextBoxResultID="TextBoxManagerId" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
